<!DOCTYPE html>
<html>
	<head>
		<meta charset="<?php echo $cfg_soft_lang; ?>">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title>钱包积分-会员中心-<?php echo $cfg_webname; ?></title>
		<script src="<?php echo $cfg_cmsurl; ?>/static/web/js/jquery.min.js"></script>
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl; ?>/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl; ?>/static/web/font/css/font-awesome.min.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl; ?>/static/web/css/style.css">
		<link rel="stylesheet" href="<?php echo $cfg_cmsurl; ?>/static/web/css/member.css">
	</head>
	<body>
		<?php include(DEDEMEMBER."/templets/top_login.htm"); ?>
		<main class="member">
			<div class="pannel">
				<div class="container">
					<div class="row">
						<div class="pannel-main col-md-12 mt-3 mb-3">
							<div class="pannel-main-container">
								<nav class="navbar navbar-expand-lg pr-0 pl-0">
									<ol class="breadcrumb mb-0 mr-auto">
										<li class="breadcrumb-item"><a href="<?php echo $cfg_memberurl;?>/">会员中心</a></li>
										<li class="breadcrumb-item">钱包积分</li></li>
									</ol>
									<span class="navbar-text">
										<a href="javascript:history.back(-1);" class="btn btn-success btn-sm">返回</a>
									</span>
								</nav>
								<div id="mainCp">
									<div class="alert alert-success">
										<?php echo $cfg_ml->GetSta($dsql); ?>
									</div>
									<?php
									if($cfg_money_scores > 0) {
									?>
									<div class="postForm">
										<?php
										$canCav = floor($cfg_ml->fields['scores'] / $cfg_money_scores);
										?>
										<span>用积分兑换金币（<?php echo "兑换价格：{$cfg_money_scores} 积分/个，您目前可兑换金币数量：{$canCav} 个"; ?>）</span>
										<form name="formrank" action="index_do.php?dopost=money2s&fmdo=user" method="post">
											<table width="100%" cellpadding="0" cellspacing="0" class="table">
												<tbody>
													<tr>
														<td width="20%" align="right">兑换数量：</td>
														<td width="270"><input name="money" type="text" id="money" class="form-control" value="<?php echo $canCav; ?>" style="width:260px"></td>
														<td align="left"><button class="btn btn-success btn-sm" type="submit">兑换</button></td>
													</tr>
												</tbody>
											</table>
										</form>
									</div>
									<?php
									}
									?>
									<div class="postForm">
										<span class="meTitle">用点卡充值</span>
										<form name="formrank" action="check_card.php" method="post">
											<table width="100%" cellpadding="0" cellspacing="0" class="table">
												<tbody>
													<tr>
														<td width="20%" align="right">点卡密码：</td>
														<td><input name="cardid" type="text" id="cardid" size="38" class="form-control" style="width:260px"></td>
													</tr>
													<tr>
														<td align="right">验证码</td>
														<td width="270">
															<input name="vdcode" type="text" id="vdcode" class="form-control" style="display:inline-block;width:260px;text-transform:uppercase">
															<img src="../apps/vdimgck.php" alt="验证码" title="验证码" onclick="this.src=this.src+'?'" style="cursor:pointer">
														</td>
													</tr>
													<tr>
														<td align="right"></td>
														<td><button class="btn btn-success btn-sm" type="submit">充值</button></td>
													</tr>
												</tbody>
											</table>
										</form>
									</div>
									<div class="postForm">
										<span class="meTitle">购买新点卡</span>
										<form name="f1" action="buy_action.php" method="post">
											<input type="hidden" name="product" value="card">
											<table width="100%" cellpadding="0" cellspacing="0" class="table">
												<tr style="background:#F8FCF1">
													<th width="10%">选择</th>
													<th>点卡类型</th>
													<th width="16%">金币数量</th>
													<th width="12%">购买价格</th>
												</tr>
												<tbody>
													<?php echo $moneycards; ?>
												</tbody>
											</table>
											<button class="btn btn-success btn-sm" type="submit">购买</button>
										</form>
									</div>
									<div class="postForm mt-3">
										<span class="meTitle">会员升级</span>
										<form name="f1" action="buy_action.php" method="post">
											<input type="hidden" name="product" value="member">
											<table width="100%" cellpadding="0" cellspacing="0" class="table">
												<thead>
													<tr>
														<th colspan="5" style="text-align:left;padding-left:10px">会员升级</th>
													</tr>
												</thead>
												<tr style="background:#F8FCF1">
													<th width="10%">选择</th>
													<th>产品名称</th>
													<th width="12%">会员类型</th>
													<th width="16%">时限（天）</th>
													<th width="12%">价格</th>
												</tr>
												<tbody>
													<?php echo $membertypes?>
												</tbody>
											</table>
											<button class="btn btn-success btn-sm" type="submit">购买</button>
										</form>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</main>
		<?php include(DEDEMEMBER."/templets/footer.htm"); ?>
	</body>
</html>